<template>
  <a-drawer
    width="576"
    :title="formTitle"
    :label-col="4"
    :wrapper-col="14"
    :visible="open"
    :body-style="{height:'calc(100vh - 100px)',overflow:'auto'}"
    @close="cancel">
    <a-form-model ref="form" :model="form" :rules="rules" layout="vertical">
      <a-spin :spinning="spinning" :delay="delayTime" tip="Loading...">
        <a-row :gutter="32">
          rimage: undefined,
          rdesc: undefined
          <a-col :span="12">
            <a-form-model-item label="报表名称" prop="rname">
              <a-input v-model="form.rname" placeholder="请输入报表名称"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="报表编码" prop="rcode">
              <a-input v-model="form.rcode" placeholder="请输入报表编码"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="报表分组" prop="rgroup">
              <a-input v-model="form.rgroup" placeholder="请输入报表分组"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="报表类型" prop="rtype">
              <s-select v-model="form.rtype" dictCode="rtypes" placeholder="请选择报表类型"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <a-form-model-item label="报表缩略图" prop="rimage">
              <s-upload v-model="form.rimage" fileType="image" :number="1"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <a-form-model-item label="报表描述" prop="rdesc">
              <a-textarea v-model="form.rdesc" placeholder="请输入报表描述" :auto-size="{ minRows: 6, maxRows: 6 }"/>
            </a-form-model-item>
          </a-col>
        </a-row>
      </a-spin>
      <div class="bottom-control">
        <a-space>
          <a-button :disabled="disabled" @click="cancel">
            取消
          </a-button>
          <a-button type="primary" :disabled="disabled" @click="submitForm(true)">
            保存
          </a-button>
        </a-space>
      </div>
    </a-form-model>
  </a-drawer>
</template>
<script>
import ReportEditForm from './ReportForm'
export default {
  ...ReportEditForm
}
</script>
